package com.aptech.domain.JPA;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Event entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "EVENT", schema = "dbo", catalog = "Blue_Pumpkin")
public class Event implements java.io.Serializable {

	// Fields

	private Integer eventId;
	private String eventName;
	private Timestamp startDate;
	private Timestamp endDate;
	private String shortDetail;
	private String eventDetail;
	private String addressTitle;
	private String addressPlace;
	private Set<EventRequest> eventRequests = new HashSet<EventRequest>(0);

	// Constructors

	/** default constructor */
	public Event() {
	}

	/** minimal constructor */
	public Event(Integer eventId) {
		this.eventId = eventId;
	}

	/** full constructor */
	public Event(Integer eventId, String eventName, Timestamp startDate,
			Timestamp endDate, String shortDetail, String eventDetail,
			String addressTitle, String addressPlace,
			Set<EventRequest> eventRequests) {
		this.eventId = eventId;
		this.eventName = eventName;
		this.startDate = startDate;
		this.endDate = endDate;
		this.shortDetail = shortDetail;
		this.eventDetail = eventDetail;
		this.addressTitle = addressTitle;
		this.addressPlace = addressPlace;
		this.eventRequests = eventRequests;
	}

	// Property accessors
	@Id
	@Column(name = "EVENT_ID", unique = true, nullable = false)
        @GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getEventId() {
		return this.eventId;
	}

	public void setEventId(Integer eventId) {
		this.eventId = eventId;
	}

	@Column(name = "EVENT_NAME", length = 250)
	public String getEventName() {
		return this.eventName;
	}

	public void setEventName(String eventName) {
		this.eventName = eventName;
	}

	@Column(name = "START_DATE", length = 23)
	public Timestamp getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Timestamp startDate) {
		this.startDate = startDate;
	}

	@Column(name = "END_DATE", length = 23)
	public Timestamp getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Timestamp endDate) {
		this.endDate = endDate;
	}

	@Column(name = "SHORT_DETAIL", length = 250)
	public String getShortDetail() {
		return this.shortDetail;
	}

	public void setShortDetail(String shortDetail) {
		this.shortDetail = shortDetail;
	}

	@Column(name = "EVENT_DETAIL", length = 1073741823)
	public String getEventDetail() {
		return this.eventDetail;
	}

	public void setEventDetail(String eventDetail) {
		this.eventDetail = eventDetail;
	}

	@Column(name = "ADDRESS_TITLE", length = 250)
	public String getAddressTitle() {
		return this.addressTitle;
	}

	public void setAddressTitle(String addressTitle) {
		this.addressTitle = addressTitle;
	}

	@Column(name = "ADDRESS_PLACE", length = 250)
	public String getAddressPlace() {
		return this.addressPlace;
	}

	public void setAddressPlace(String addressPlace) {
		this.addressPlace = addressPlace;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "event")
	public Set<EventRequest> getEventRequests() {
		return this.eventRequests;
	}

	public void setEventRequests(Set<EventRequest> eventRequests) {
		this.eventRequests = eventRequests;
	}

}